(function(a){"use strict";var s="bx-lazyload-watch";var t="bx-lazyload-loading";var e="bx-lazyload-success";var l="bx-lazyload-error";var r="bx-lazyload-hidden";var d=null;var o=function a(o){var i=o.dataset.lazyloadSuccessClass?o.dataset.lazyloadSuccessClass.split(" "):[e];delete o.dataset.lazyloadSuccessClass;var c=o.dataset.lazyloadErrorClass?o.dataset.lazyloadErrorClass.split(" "):[l];delete o.dataset.lazyloadErrorClass;o.classList.add(t);var n=new Image;n.src=o.dataset.lazyloadSrc;if(!o.dataset.lazyloadHiddenSrc){o.dataset.lazyloadHiddenSrc=o.src}n.onload=function(){var a;if(o.classList.contains(r)){return false}if(o.dataset.lazyloadSrc){o.src=o.dataset.lazyloadSrc}o.classList.remove(t);(a=o.classList).add.apply(a,babelHelpers.toConsumableArray(i))};n.onerror=function(){var a;if(o.classList.contains(r)){return false}if(o.dataset.lazyloadErrorSrc){o.src=o.dataset.lazyloadErrorSrc}else{o.dataset.lazyloadSrc=o.src}o.classList.remove(t);(a=o.classList).add.apply(a,babelHelpers.toConsumableArray(c))};if(typeof o.dataset.lazyloadDontHide!=="undefined"){o.classList.remove(s);delete o.dataset.lazyloadDontHide;if(d){d.unobserve(o)}}};if(typeof window.IntersectionObserver!=="undefined"){d=new IntersectionObserver(function(a,e){a.forEach(function(a){var e=a.target;if(a.isIntersecting){if(e.classList.contains(r)){if(e.dataset.lazyloadSrc){e.src=e.dataset.lazyloadSrc}e.classList.remove(r)}else if(e.classList.contains(s)){return true}else{e.classList.add(s);o(e)}}else{if(e.classList.contains(r)||!e.classList.contains(s)){return true}if(e.dataset.lazyloadHiddenSrc){e.src=e.dataset.lazyloadHiddenSrc}e.classList.remove(t);e.classList.add(r)}})},{threshold:[0,1]})}BX.Vue.directive("bx-lazyload",{bind:function a(s){if(!s.src||s.src===location.href.replace(location.hash,"")){s.src="data:image/svg+xml,%3Csvg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E"}if(d){d.observe(s)}else{o(s)}},componentUpdated:function a(s){if(!s.classList.contains(r)&&!s.classList.contains(t)&&s.dataset.lazyloadSrc&&s.dataset.lazyloadSrc!=s.src){if(!s.dataset.lazyloadSrc.startsWith("http")){var e=document.createElement("a");e.href=s.dataset.lazyloadSrc;if(e.href==s.src){return}}o(s)}},unbind:function a(s){if(d){d.unobserve(s)}}})})(this.window=this.window||{});
//# sourceMappingURL=ui.vue.directives.lazyload.bundle.map.js